package com.etc.order.provider.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.etc.order.common.domain.SellerInfo;
import com.etc.order.common.service.SellerInfoService;
import com.etc.order.provider.mapper.SellerInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class SellerInfoServiceImpl implements SellerInfoService {
    @Autowired
    private SellerInfoMapper sellerInfoMapper;

    @Override
    public SellerInfo getOne(String uid) {
        return sellerInfoMapper.getOne(uid);
    }

    @Override
    public boolean login(String uid, String password) {
        SellerInfo sellerInfo = getOne(uid);
        return sellerInfo != null && sellerInfo.getPassword().equals(password);
    }
}
